FROM anapsix/alpine-java:8_server-jre_unlimited
LABEL Author=fhzn<fhzn@fhzncloud.com>

RUN echo "http://mirrors.ustc.edu.cn/alpine/v3.3/main/" > /etc/apk/repositories \
    && apk --update add fontconfig \
    && mkdir /usr/share/fonts
COPY ./cloud-xtyf-conversions/src/main/resources/fonts/*.ttf /usr/share/fonts/

RUN fc-cache \
    && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && mkdir -p /cloud-conv

WORKDIR /cloud-conv
ADD ./cloud-xtyf-conversions/target/*.jar ./

EXPOSE 8741
CMD java -Djava.security.egd=file:/dev/./urandom -jar cloud-xtyf-conversions-0.0.1-SNAPSHOT.jar
